int a=0;

void setup() {
  // put your setup code here, to run once:
  pinMode(6,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  a=analogRead(16);
  if(a<=100)
  {
    analogWrite(6,0);
  }
  else if(a>=300)
  {
    analogWrite(6,120);
  }
}
